from flask import Flask, g, url_for
from admin.admin_module import admin_bp
from lang_module import lang_bp

app = Flask(__name__)
# app.register_blueprint(admin_bp)
app.register_blueprint(admin_bp, url_prefix='/admin')
app.register_blueprint(lang_bp)

# @app.route('/<lang_code>/')
# def index(lang_code):
#     g.lang_code = lang_code
#     return '<h1>Index of language %s</h1>' % g.lang_code

# @app.route('/<lang_code>/about')
# def about(lang_code):
#     g.lang_code = lang_code
#     return '<h1>Language base URL is %s</h1>' % url_for('index', lang_code=g.lang_code)

if __name__ == '__main__':
    app.run(host='0.0.0.0', debug=True)